package com.ruoyi.cert.domain;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.pv.domain.PvTrainingClass;
import lombok.*;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 证书对象 cert
 *
 * @author mxh
 * @date 2023-03-26
 */
@AllArgsConstructor
@NoArgsConstructor
@Data
@Builder
@ToString
public class Cert extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    private Long id;

    /**
     * 证书编号
     */
    @Excel(name = "证书编号")
    private String certNo;

    /**
     * 证书名称
     */
//    @Excel(name = "证书名称")
    private String name;

    /**
     * 颁发日期 / 发证日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "颁发日期 / 发证日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date issuanceDate;

    /**
     * 有效期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
//    @Excel(name = "有效期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date exp;

    /**
     * 颁证机构id
     */
//    @Excel(name = "颁证机构id")
    private Long certOrganizationId;

    /**
     * 班级id
     */
//    @Excel(name = "班级id")
    private Long classId;

    /**
     * 持证人ids
     */
//    @Excel(name = "持证人 ")
    private Long studentId;

    /**
     * 颁证类型id
     */
//    @Excel(name = "颁证类型id")
    private Long certTypeId;

    /**
     * 机构id
     */
//    @Excel(name = "机构id")
    private Long deptId;

    /**
     * 状态 0申请 1认证 2吊销
     */
    @Excel(name = "状态 0申请 1认证 2吊销")
    private Integer status;

    /**
     * 核准日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
//    @Excel(name = "核准日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date approvalDate;

    /**
     * 核准人
     */
//    @Excel(name = "核准人")
    private String approvalBy;

    /**
     * 核准说明
     */
//    @Excel(name = "核准说明")
    private String approvalInfo;

    /**
     * 吊销日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
//    @Excel(name = "吊销日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date revocationDate;

    /**
     * 吊销人
     */
//    @Excel(name = "吊销人")
    private String revocationBy;

    /**
     * 吊销原因
     */
//    @Excel(name = "吊销原因")
    private String revocationInfo;

    /**
     * 防伪码
     */
//    @Excel(name = "防伪码")
    private String securityCode;

    /**
     * 二维码地址
     */
//    @Excel(name = "二维码地址")
    private String qrCode;

    /**
     * 证书地址
     */
//    @Excel(name = "证书地址")
    private String certImg;

    /**
     * 删除标识
     */
    private Integer delFlag;

    /**
     * 预留字段1
     */
//    @Excel(name = "预留字段1")
    private String reservedOne;

    /**
     * 预留字段2
     */
//    @Excel(name = "预留字段2")
    private String reservedTwo;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private String startTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private String endTime;

    /**
     * 传参参数
     */
    private Long[] studentIds;

    private SysUser student;
    private PvTrainingClass trainingClass;
    private CertOrganization certOrganization;


    @Excel(name = "证书名称")
    private String certName;
    @Excel(name = "持证人名称")
    private String userName;
    @Excel(name = "班级名称")
    private String className;
    @Excel(name = "机构名称")
    private String orgName;

    private Integer pageNum;
    private Integer pageSize =1000;

}
